import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.layout.*;
import javafx.stage.Stage;
import javafx.scene.text.Font;

public class ComplexGui extends Application {

    @Override
    public void start(Stage primaryStage) {
        Font font = Font.loadFont("/userdata/fonts/hywh.ttf", 20);

        TabPane tabPane = new TabPane();

        Tab tab1 = new Tab("Tab 1");
        VBox tab1Content = new VBox(10);
        tab1Content.setPadding(new Insets(10));

        Label label1 = new Label("Tab 1 Content");
        label1.setFont(font);

        Button button1 = new Button("Button 1");
        button1.setOnAction(e -> label1.setText("Button 1 Clicked!"));

        TextField textField = new TextField();
        textField.setPromptText("Enter text");

        tab1Content.getChildren().addAll(label1, button1, textField);
        tab1.setContent(tab1Content);

        Tab tab2 = new Tab("Tab 2");
        VBox tab2Content = new VBox(10);
        tab2Content.setPadding(new Insets(10));

        Label label2 = new Label("Tab 2 Content");
        label2.setFont(font);

        Button button2 = new Button("Button 2");
        button2.setOnAction(e -> label2.setText("Button 2 Clicked!"));

        CheckBox checkBox = new CheckBox("Check me");
        ProgressBar progressBar = new ProgressBar(0.5);

        tab2Content.getChildren().addAll(label2, button2, checkBox, progressBar);
        tab2.setContent(tab2Content);

        tabPane.getTabs().addAll(tab1, tab2);

        VBox layout = new VBox(10);
        layout.setPadding(new Insets(10));
        layout.getChildren().addAll(tabPane);

        Scene scene = new Scene(layout, 320, 170);

        primaryStage.setTitle("Complex GUI");
        primaryStage.setScene(scene);
        primaryStage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}
